home *** CD-ROM | disk | FTP | other *** search
/ Revista do CD-ROM 101 / CD-ROM 101.iso / compl / maya5ple / Install_MayaPLE5_English.exe / Maya / Data1.cab / AEshadingEngineTemplate.mel < prev    next >
Encoding:
Text File  |  2003-07-17  |  3.9 KB  |  141 lines

  1. // Copyright (C) 1997-2002 Alias|Wavefront,
  2. // a division of Silicon Graphics Limited.
  3. //
  4. // The information in this file is provided for the exclusive use of the
  5. // licensees of Alias|Wavefront.  Such users have the right to use, modify,
  6. // and incorporate this code into other products for purposes authorized
  7. // by the Alias|Wavefront license agreement, without fee.
  8. //
  9. // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  10. // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
  11. // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  12. // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  13. // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  14. // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  15. // PERFORMANCE OF THIS SOFTWARE.
  16. //
  17. //
  18. //  Alias|Wavefront Script File
  19. //
  20. //  Creation Date:    May 22, 1997
  21. //  Author:        sw
  22. //
  23. //  Procedure Name:
  24. //    AEshadingEngineTemplate
  25. //
  26. //  Description Name;
  27. //    Creates the attribute editor controls for the shadingEngine Node
  28. //
  29. //  Input Value:
  30. //    nodeName 
  31. //
  32. //  Output Value:
  33. //    None
  34. // 
  35.  
  36. global proc AEshadingEngineShadersNew ( string $surfaceShader, 
  37.                     string $volumeShader,
  38.                     string $imageShader,
  39.                     string $displacementShader,
  40.                     string $defaultShadows )
  41. {
  42.     setUITemplate -pst attributeEditorTemplate;
  43.  
  44.     attrNavigationControlGrp
  45.         -l "Surface Material"
  46.         -at $surfaceShader
  47.         surfaceShaderControl;
  48.  
  49.     attrNavigationControlGrp
  50.         -l "Volume Material"
  51.         -at $volumeShader
  52.         volumeShaderControl;
  53.  
  54. //    attrNavigationControlGrp
  55. //        -l "Image Material"
  56. //        -at $imageShader
  57. //        imageShaderControl;
  58.  
  59.     attrNavigationControlGrp
  60.         -l "Displacement Mat."
  61.         -at $displacementShader
  62.         displacementShaderControl;
  63.  
  64. //    attrNavigationControlGrp
  65. //        -l "Default Shadows"
  66. //        -at $defaultShadows
  67. //        defaultShadowsControl;
  68.  
  69.     setUITemplate -ppt;
  70. }
  71.  
  72. global proc AEshadingEngineShadersReplace ( string $surfaceShader, 
  73.                     string $volumeShader,
  74.                     string $imageShader,
  75.                     string $displacementShader,
  76.                     string $defaultShadows )
  77. {
  78.     attrNavigationControlGrp -edit
  79.         -at $surfaceShader
  80.         surfaceShaderControl;
  81.  
  82.     attrNavigationControlGrp -edit
  83.         -at $volumeShader
  84.         volumeShaderControl;
  85.  
  86. //    attrNavigationControlGrp -edit
  87. //        -at $imageShader
  88. //        imageShaderControl;
  89.  
  90.     attrNavigationControlGrp -edit
  91.         -at $displacementShader
  92.         displacementShaderControl;
  93.  
  94. //    attrNavigationControlGrp -edit
  95. //        -at $defaultShadows
  96. //        defaultShadowsControl;
  97. }
  98.  
  99.  
  100. global proc AEshadingEngineTemplate ( string $nodeName )
  101. {
  102.     AEswatchDisplay $nodeName;
  103.     editorTemplate -beginScrollLayout;
  104.         editorTemplate -beginLayout "Shading Group Attributes" -collapse 0;
  105.             editorTemplate -callCustom "AEshadingEngineShadersNew"
  106.                     "AEshadingEngineShadersReplace"
  107.                     "surfaceShader"
  108.                     "volumeShader"
  109.                     "imageShader"
  110.                     "displacementShader"
  111.                     "defaultShadows";
  112.         editorTemplate -endLayout;
  113.  
  114.         // mental ray material attributes
  115.         if (`exists AEmentalrayMaterial`)
  116.             AEmentalrayMaterial $nodeName;
  117.  
  118.         editorTemplate -suppress "surfaceShader";
  119.         editorTemplate -suppress "volumeShader";
  120.         editorTemplate -suppress "imageShader";
  121.         editorTemplate -suppress "displacementShader";
  122.         editorTemplate -suppress "defaultLights";
  123.         editorTemplate -suppress "defaultShadows";
  124.         editorTemplate -suppress "dagSetMembers";
  125.         editorTemplate -suppress "dnSetMembers";
  126.         editorTemplate -suppress "groupNodes";
  127.         editorTemplate -suppress "usedBy";
  128.         editorTemplate -suppress "unsolicited";
  129.         editorTemplate -suppress "linkedLights";
  130.         editorTemplate -suppress "ignoredLights";
  131.         editorTemplate -suppress "linkedShadows";
  132.         editorTemplate -suppress "ignoredShadows";
  133.  
  134.         // include/call base class/node attributes
  135.         AEobjectSetNoScroll $nodeName;
  136.  
  137.     editorTemplate -suppress "bogusAttribute";
  138.     editorTemplate -addExtraControls;
  139.     editorTemplate -endScrollLayout;
  140. }
  141.